<?php

class Services extends CI_Controller{

	function __construct(){
		parent::__construct();
		$this->load->model('office_services_m');
		$this->load->model('categories_m');
		if($this->session->userdata('username') == false){
			redirect('login');
		}
	}
	function add_office_services(){
		
		$res = $this->office_services_m->add_office_services();
		if($this->input->post('add_other_office') == false){
			if($res) redirect('accounts'); else var_dump(mysql_error());
		}
		else{
			if($res) redirect('services/add'); else var_dump(mysql_error());
		}
		
	}
	function add(){
		$categories = $this->categories_m->display_all();
		
		$data = array(
			'title' => 'Add new Services',
			'categories' => $categories // if false means its blank..
		);
		
		$this->load->view('account/includes/header',$data);
		$this->load->view('account/reg_office_services',$data);
		$this->load->view('account/includes/jscript.php');
		$this->load->view('account/includes/footer');
	}
	function index(){
		
		
		
	}// end index function..


}// end services controller..